package com.ctsi.ssdc.domain;

import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallGrouponRules")
public class LitemallGrouponRules implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer id;

    /**
     * @Fields goodsId 商品表的商品ID
     */
    @ApiModelProperty("goodsId")
    private Integer goodsId;

    /**
     * @Fields goodsName 商品名称
     */
    @ApiModelProperty("goodsName")
    private String goodsName;

    /**
     * @Fields picUrl 商品图片或者商品货品图片
     */
    @ApiModelProperty("picUrl")
    private String picUrl;

    /**
     * @Fields discount 优惠金额
     */
    @ApiModelProperty("discount")
    private BigDecimal discount;

    /**
     * @Fields discountMember 达到优惠条件的人数
     */
    @ApiModelProperty("discountMember")
    private Integer discountMember;

    /**
     * @Fields expireTime 团购过期时间
     */
    @ApiModelProperty("expireTime")
    private ZonedDateTime expireTime;

    /**
     * @Fields status 团购规则状态，正常上线则0，到期自动下线则1，管理手动下线则2
     */
    @ApiModelProperty("status")
    private Short status;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return goods_id 商品表的商品ID
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * @param goodsId 商品表的商品ID
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /** 
     * @return goods_name 商品名称
     */
    public String getGoodsName() {
        return goodsName;
    }

    /**
     * @param goodsName 商品名称
     */
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName == null ? null : goodsName.trim();
    }

    /** 
     * @return pic_url 商品图片或者商品货品图片
     */
    public String getPicUrl() {
        return picUrl;
    }

    /**
     * @param picUrl 商品图片或者商品货品图片
     */
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl == null ? null : picUrl.trim();
    }

    /** 
     * @return discount 优惠金额
     */
    public BigDecimal getDiscount() {
        return discount;
    }

    /**
     * @param discount 优惠金额
     */
    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    /** 
     * @return discount_member 达到优惠条件的人数
     */
    public Integer getDiscountMember() {
        return discountMember;
    }

    /**
     * @param discountMember 达到优惠条件的人数
     */
    public void setDiscountMember(Integer discountMember) {
        this.discountMember = discountMember;
    }

    /** 
     * @return expire_time 团购过期时间
     */
    public ZonedDateTime getExpireTime() {
        return expireTime;
    }

    /**
     * @param expireTime 团购过期时间
     */
    public void setExpireTime(ZonedDateTime expireTime) {
        this.expireTime = expireTime;
    }

    /** 
     * @return status 团购规则状态，正常上线则0，到期自动下线则1，管理手动下线则2
     */
    public Short getStatus() {
        return status;
    }

    /**
     * @param status 团购规则状态，正常上线则0，到期自动下线则1，管理手动下线则2
     */
    public void setStatus(Short status) {
        this.status = status;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallGrouponRules other = (LitemallGrouponRules) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null :
				 this.getGoodsId().equals(other.getGoodsId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null :
				 this.getGoodsName().equals(other.getGoodsName()))
            && (this.getPicUrl() == null ? other.getPicUrl() == null :
				 this.getPicUrl().equals(other.getPicUrl()))
            && (this.getDiscount() == null ? other.getDiscount() == null :
				 this.getDiscount().equals(other.getDiscount()))
            && (this.getDiscountMember() == null ? other.getDiscountMember() == null :
				 this.getDiscountMember().equals(other.getDiscountMember()))
            && (this.getExpireTime() == null ? other.getExpireTime() == null :
				 this.getExpireTime().equals(other.getExpireTime()))
            && (this.getStatus() == null ? other.getStatus() == null :
				 this.getStatus().equals(other.getStatus()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());
        result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
        result = prime * result + ((getDiscountMember() == null) ? 0 : getDiscountMember().hashCode());
        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}